POV-Ray : Newsgroups : povray.general : Shadows without Objects : Re: Shadows without Objects Server Time
12 Aug 2024 19:39:35 EDT (-0400)
  Re: Shadows without Objects  
From: Lars W 
Date: 17 Feb 1999 15:53:58
Message: <36CB2CB3.1D9C7925@snafu.de>
Thanks for the tip,

by implementing this into my scene i recogniced another problem, maybe you can
help me with this one too.

Does POV-Ray only supports 1 bit Alpha Channels, or is there a Trick to use more
then 1 bit, maybe 8 or 16
or am i so blind, and it has more than one bit, cause the compositing Programm
DTA ( Daves Targa Animator 3.0 beta ) converts
the alpha channel only to an black and White image, even when there are
transparencies in there ( i removed any Skyspheres for
testing that ).

greetings Lars


Thorsten Froehlich schrieb:

> In article <36C87745.5713B049@snafu.de> , "Lars W." <lar### [at] snafude>
> wrote:
>
> > I am trying to combine real Images, and POV-Images, and for that i need
> > to know
> > how to create Objects, that make shadows, but are not seen, i mean they
> > must be
> > 100 % transparent, but the shadows must be dark.
> >
> > Does anybody know if such things are possible with POV-Ray ?
> > or maybe knows some alternatives ?
>
> Yes, there is a trick. Combining the filter and transmit color components
> will do it. Then make sure you render _with_ alpha channel to a format that
> supports alpha channels (e.g. PNG). All you need now is a program that can
> use this alpha channel to mix the two images (Photoshop and some shareware
> programs can do it).
> Now here is the sample:
>
> // *****************
>
> camera
> {
>   location  <0.0, 0.5, -4.0>
>   direction 1.5*z
>   right     4/3*x
>   look_at   <0.0, 0.0,  0.0>
> }
>
> // you need skysphere not background
> sky_sphere
> {
>   pigment
>   {
>     color blue 1.0
>   }
> }
>
> // some light
> light_source
> {
>   <-30, 30, -30>
>   color rgb 1.0
> }
>
> plane { y, -1 pigment { color green 1.0 } }
>
> // the object
> sphere { 0.0, 1 texture { pigment { color rgb 1.0 } } }
>
> // the "hole", just a bit larger than the original object
> sphere { 0.0, 1.0001 texture { pigment { color filter 0.0 transmit 1.0 } } }
>
> // *****************
>
> So all you need to do is to create the object twice. Make one (the second
> one in the example above) of them a bit larger and set its texture to
> "texture { pigment { color filter 0.0 transmit 1.0 } }". Note that just
> "color filter 0.0 transmit 1.0" (the direct color option) won't work, you
> need a complete texture. The filter makes the object invisible and the
> transmit make the "hole" in the alpha channel.
> In the example the first object creates the shadow and when you render with
> preview you won't see a difference (except on Macs where you can see the
> alpha channle during rendering).
>
>     Thorsten


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.